<?php
namespace Home\Controller;

class HelpController extends HomeBaseController
/**
 * 帮助中心页面
 */
{
    public function index(){
        $this->display('help/index');
    }
    
    
    public function zidong()
    {
        $loanid=1;
        $seuid=2;
        $loadInfo = M('LoaderInfo')->find($loanid);
        if(empty($loadInfo)){
            return 0;
        }
        $realCredit=$loadInfo['money']/$loadInfo['domainnum'];
        $InvestorInfodao= M('InvestorInfo');
        $resu=0;
        $condi['dd_user_assets.creditmoney']=array('egt',0);
        $condi['dd_investor_info.is_auto']=2;
        $condi['dd_investor_info.uid']=array('neq',$seuid);
        $condi['dd_investor_info.term_begin']=array('elt',$loadInfo['term']);
        $condi['dd_investor_info.term_end']=array('egt',$loadInfo['term']);
        $condi['dd_inves_domcate.credit']=$realCredit;
        $condi['dd_inves_domcate.domtypeid']=$loadInfo['domaintypeid'];
        $condi['dd_inves_domcate.rate']=array('elt',$loadInfo['rate']);//实际利率按借款人的算
        $leavemoney=$loadInfo['money'];//还需要借的钱
        $invest = $InvestorInfodao->join(' LEFT JOIN dd_user_assets on dd_investor_info.uid=dd_user_assets.uid')->join(' LEFT JOIN dd_inves_domcate on dd_investor_info.id=dd_inves_domcate.inve_id')->field('dd_investor_info.id,dd_investor_info.uid,dd_investor_info.term_begin,dd_investor_info.term_end,dd_user_assets.creditmoney')->where($condi)->order("dd_investor_info.create_time desc")->limit(1)->select();
        echo '----------'.$InvestorInfodao->getLastSql();exit();
    }
}

?>